package com.yanqu.road.server.manger.config.grandchild.talent.entity;

import com.yanqu.road.entity.config.grandchild.GrandChildTalentInfo;
import com.yanqu.road.entity.grandchild.GrandChildData;
import com.yanqu.road.server.manger.config.grandchild.talent.enums.eGrandChildSkillEffectStage;

import java.util.ArrayList;
import java.util.List;

public final class TalentTriggerParamBuilder {
    private GrandChildData grandChild;
    private GrandChildTalentInfo talentInfo;
    private GrandChildTalentConditionParam condition;
    private eGrandChildSkillEffectStage stage;
    private List<TalentTriggerResult> lastTriggerList = new ArrayList<>();
    private List<Integer> chosenTalentList = new ArrayList<>();

    private TalentTriggerParamBuilder() {
    }

    public static TalentTriggerParamBuilder aTalentTriggerParam() {
        return new TalentTriggerParamBuilder();
    }

    public TalentTriggerParamBuilder setGrandChild(GrandChildData grandChild) {
        this.grandChild = grandChild;
        return this;
    }

    public TalentTriggerParamBuilder setTalentInfo(GrandChildTalentInfo talentInfo) {
        this.talentInfo = talentInfo;
        return this;
    }

    public TalentTriggerParamBuilder setCondition(GrandChildTalentConditionParam condition) {
        this.condition = condition;
        return this;
    }

    public TalentTriggerParamBuilder setStage(eGrandChildSkillEffectStage stage) {
        this.stage = stage;
        return this;
    }

    public TalentTriggerParamBuilder setLastTriggerList(List<TalentTriggerResult> lastTriggerList) {
        this.lastTriggerList = lastTriggerList;
        return this;
    }

    public TalentTriggerParamBuilder setChosenTalentList(List<Integer> chosenTalentList) {
        this.chosenTalentList = chosenTalentList;
        return this;
    }

    public TalentTriggerParam build() {
        TalentTriggerParam talentTriggerParam = new TalentTriggerParam();
        talentTriggerParam.setGrandChild(grandChild);
        talentTriggerParam.setTalentInfo(talentInfo);
        talentTriggerParam.setCondition(condition);
        talentTriggerParam.setStage(stage);
        talentTriggerParam.setLastTriggerList(lastTriggerList);
        talentTriggerParam.setChosenTalentList(chosenTalentList);
        return talentTriggerParam;
    }
}
